home *** CD-ROM | disk | FTP | other *** search
/ Libris Britannia 4 / science library(b).zip / science library(b) / PROGRAMM / PASCAL / 0199.ZIP / FNTDEMO2.PAS < prev    next >
Pascal/Delphi Source File  |  1986-02-01  |  3KB  |  106 lines

  1.  
  2.                (* ******************************* *)
  3.                (*                                 *)
  4.                (*       NewFonts.pas Demo2        *)
  5.                (*                                 *)
  6.                (*  This Demo Shows You How to Use *)
  7.                (*  Font Files That Have Been Con- *)
  8.                (*  verted to Include Files That   *)
  9.                (*  can be Included Directly into  *)
  10.                (*  Your Code.                     *)
  11.                (*                                 *)
  12.                (*  (c) Donald L. Pavia            *)
  13.                (*  Department of Chemistry        *)
  14.                (*  Western Washington University  *)
  15.                (*  Bellingham, WA    98225        *)
  16.                (*                                 *)
  17.                (*              February 1, 1986   *)
  18.                (*                                 *)
  19.                (* ******************************* *)
  20.  
  21.  
  22. program FontDemo;
  23.  
  24. {$I HIASCII.INC}
  25. {$I CHEMMATH.INC}
  26.  
  27. var  i,j,k,m : integer;
  28.  
  29. {----------------------------------------------------------------------------}
  30. procedure ChemMathFonts;
  31.  
  32. begin
  33.      memw[$0000:$007E] := seg(ChemMath);
  34.      memw[$0000:$007C] := ofs(ChemMath);
  35.  
  36. end; { procedure ChangeFont }
  37. {----------------------------------------------------------------------------}
  38. procedure HiAsciiFonts;
  39.  
  40. begin
  41.      memw[$0000:$007E] := seg(HiAscii);
  42.      memw[$0000:$007C] := ofs(HiAscii);
  43.  
  44. end; { procedure HiAscii }
  45. {----------------------------------------------------------------------------}
  46.  
  47. BEGIN
  48.  
  49.      (* *********************** MED RES MODE *************************** *)
  50.  
  51.      GraphColorMode; GraphBackGround (1); Palette (0);
  52.  
  53.      ChemMathFonts;
  54.  
  55.      TextColor (1);
  56.      gotoxy (5,2);   write ('CH',#133,'CH',#132,'CO',#132,'H');
  57.      TextColor (2);
  58.      gotoxy (10,5);  write ('x',#143,' + y',#146,' = z',#142);
  59.      TextColor (3);
  60.      gotoxy (15,8);  write ('Na',#150,' HCO',#133,#151);
  61.  
  62.      HiAsciiFonts;
  63.  
  64.      TextColor (1); i := 11; m := 0;
  65.      for j := 1 to 4 do begin
  66.          gotoxy (1,i); for K := 0 to 35 do
  67.          if ((128+k+m) < 256) then write (chr(128 + k + m));
  68.          i := i + 2; m := m + 36;
  69.      end;
  70.  
  71.      ChemMathFonts;
  72.  
  73.      TextColor (3);
  74.      gotoxy (5,20); write ('CH',#133,'CH',#132,'(CH',#132,')',#138,'COOH');
  75.      TextColor (2);
  76.      gotoxy (10,22); write ('x',#142,' + y',#142,' = a',#143,' x b',#144);
  77.  
  78.      TextColor (1);
  79.      gotoxy (25,25); write ('Press Enter');
  80.      readln;
  81.  
  82.      (* ************************ HI RES MODE *************************** *)
  83.  
  84.      HiRes; HiResColor (1);                 { still redefined fonts }
  85.  
  86.      gotoxy (1,7); write ('CH',#133,'CH',#132,'(CH',#132,')',#138,'COOH');
  87.  
  88.      HiAsciiFonts;
  89.  
  90.      i := 12; m := 0;
  91.      for j := 1 to 2 do begin
  92.           gotoxy (1,i); for k := 0 to 71 do
  93.           if ((128+k+m) < 256) then write (chr(128+k+m));
  94.           i := i + 2; M := m + 72;
  95.      end;
  96.  
  97.      ChemMathFonts;
  98.  
  99.      gotoxy (25,20); write ('x',#142,' + y',#142,' = a',#143,' x b',#144);
  100.  
  101.      HiAsciiFonts;
  102.  
  103.      gotoxy (50,25); write ('Press <ENTER> to Continue');
  104.      readln; TextMode (c80);
  105. END.
  106.